package gestion.horarios.model.jpa.entities;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the detallemallacurricular database table.
 * 
 */
@Embeddable
public class DetalleMallaCurricularPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;
	private int mallaCurricularId;
	private int detalleMallaCurricularId;

    public DetalleMallaCurricularPK() {
    }

	@Column(unique=true, nullable=false)
	public int getMallaCurricularId() {
		return this.mallaCurricularId;
	}
	public void setMallaCurricularId(int mallaCurricularId) {
		this.mallaCurricularId = mallaCurricularId;
	}

	@Column(unique=true, nullable=false)
	public int getDetalleMallaCurricularId() {
		return this.detalleMallaCurricularId;
	}
	public void setDetalleMallaCurricularId(int detalleMallaCurricularId) {
		this.detalleMallaCurricularId = detalleMallaCurricularId;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof DetalleMallaCurricularPK)) {
			return false;
		}
		DetalleMallaCurricularPK castOther = (DetalleMallaCurricularPK)other;
		return 
			(this.mallaCurricularId == castOther.mallaCurricularId)
			&& (this.detalleMallaCurricularId == castOther.detalleMallaCurricularId);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.mallaCurricularId;
		hash = hash * prime + this.detalleMallaCurricularId;
		
		return hash;
    }
}